import {CommonEntity} from "~/common/entity/common.entity";
import {Column, Entity, Index, JoinColumn, ManyToOne} from "typeorm";
import {UserEntity} from "~/modules/user/user.entity";

@Index(["id"])
@Entity({name: "feedback"})
export class FeedbackEntity extends CommonEntity {
  // content
  @Column({type: "text", comment: "反馈内容"})
  content: string;

  @ManyToOne(() => UserEntity, user => user.feedbacks)
	@JoinColumn({ name: "userId" })
  user: UserEntity;
}
